package com.token.iot.bratterycharging.gateway;

import org.springframework.stereotype.Component;

import com.outstanding.framework.core.Logger;
import com.outstanding.framework.core.PendingException;
import com.outstanding.framework.log.LoggerFactory;

/**
 * 上行指令解析器
 * @author chenzhixuan
 *
 */


@Component("operParser")
public class OperParser {
	
	
	
	private static Logger loger =  LoggerFactory.getLogger("transactionLogger");
	
		
	//三个字节
	public String parser(byte[] b) throws PendingException  {
		byte[] data3 = new byte[3];
		System.arraycopy(b,2, data3, 0, 3);
		String oper = new String(data3);
		loger.info("the oper is "+ oper);
		return oper;
	}
}
